<template lang="pug">
  keep-alive
    kalix-table(bizKey="lives" title='直播列表' ref="kalixTable"
    v-bind:tableFields="tableFields"
    v-bind:targetURL="livesURL"
    v-bind:bizDialog="livesDialog"
    v-bind:btnList="livesBtnList"
    v-bind:toolbarBtnList="toolbarBtnList"
    bizSearch="livesSearch")
</template>

<script type="text/ecmascript-6">
  import {LivesURL} from '../../config.toml'
  import {livesConfigBtnList} from './config'
  import KalixTable from '../../../../../components/corelib/components/common/baseTable'

  export default {
    name: 'kalix-training-livelist',
    components: {KalixTable},
    data() {
      return {
        livesURL: LivesURL,
        tableFields: [
          // {prop: 'userId', label: '直播人id'},
          {prop: 'userName', label: '直播人名'},
          {prop: 'type', label: '直播类别'},
          {prop: 'liveUrl', label: '直播间地址'},
          {prop: 'imgUrl', label: '直播封面'},
          {prop: 'num', label: '直播间位置'},
          {prop: 'liveName', label: '直播间名称'},
          {prop: 'startTime', label: '开播时间'},
          {prop: 'endTime', label: '结束时间'},
          {prop: 'state', label: '直播状态'}
        ],
        livesDialog: [
          {id: 'add', dialog: 'LivesAdd'},
          {id: 'edit', dialog: 'LivesEdit'},
          {id: 'delete', dialog: 'LivesDelete'},
          {id: 'view', dialog: 'LivesView'}
        ],
        livesBtnList: livesConfigBtnList,
        toolbarBtnList: [
          {id: 'add', isShow: true, title: '添加', icon: 'icon-pinleizengjia', isPermission: true}
        ]
      }
    }
  }
</script>

<style scoped lang="stylus">

</style>
